﻿function CellClicked(prsid, abteilungid, day, planid, columnindex, rowindex) {
    //var el = document.getElementById(id.toLocaleString());
    //el.innerHTML = "tt";
    //el.style.backgroundColor = "#80FF80";

    var i_prsid = parseInt(prsid);
    var i_abteilungid = parseInt(abteilungid);
    var i_day = parseInt(day);
    var i_planid = parseInt(planid);
    var i_rowindex = parseInt(rowindex);
    var i_columnindex = parseInt(columnindex);

    PageMethods.OnDienstCellClick(i_prsid, i_abteilungid, i_day, i_planid, i_columnindex, i_rowindex, OnLoadDienst);
}

function OnLoadDienst(result) {
    var el = document.getElementById(result.CellID);
    el.innerHTML = result.DienstBezeichnung;
    var vel = document.getElementById(result.VortrID);
    vel.innerHTML = result.Vortrag;
    var hel = document.getElementById(result.HabenID);
    hel.innerHTML = result.Haben;
    var sel = document.getElementById(result.SollID);
    sel.innerHTML = result.Soll;
    var del = document.getElementById(result.DiffID);
    del.innerHTML = result.Diff;
    
}